package com.tongji.service;

import com.bean.Mess;
import com.bean.WmsTCrDetails;
import com.bean.WmsTCustomer;
import com.tongji.mapper.TongjiMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class TongjiService {

    @Autowired
    TongjiMapper tongjiMapper;

    //库存盘点
    //刚进库存盘点时的货主查询
    public List<WmsTCustomer> getAllCustomers(String custName) { return tongjiMapper.getAllCustomers(custName); }
    //刚进库存盘点时的所有仓库查询   仓库：显示仓库中有东西的那些仓库信息：如果仓库中100个位置trayState全部都是0，仓库不能显示
    public List<String> getAllCangKu() { return tongjiMapper.getAllCangKu(); }
    //开始盘点
    public List<WmsTCustomer> getHaveSomething(String custName,String storeName) { return tongjiMapper.getHaveSomething(custName,storeName); }
    //查询数据
    public List<Map<Object, Object>> getWmsTCrDetails(WmsTCrDetails wmsTCrDetails) { return tongjiMapper.getWmsTCrDetails(wmsTCrDetails); }
    //插入数据
    public void insertWmsTCrDetails(WmsTCrDetails wmsTCrDetails) { tongjiMapper.insertWmsTCrDetails(wmsTCrDetails); }


    //货主查询
    //查询所有仓库
    public List<String> getHuoZhuAllCangKu() { return tongjiMapper.getHuoZhuAllCangKu(); }
    //查询所有货主
    public List<WmsTCustomer> getAllCust(String custName) { return tongjiMapper.getAllCust(custName); }
    //货主查询的开始盘点
    public List<WmsTCustomer> getOne(String telephone,String custName) { return tongjiMapper.getOne(telephone,custName); }


    //盘点查询历史
    public List<WmsTCrDetails> getOneWmsTCrDetails(String detailsID) { return tongjiMapper.getOneWmsTCrDetails(detailsID); }
    //根据客户ID模糊查询数据(盘点记录查询)
    public List<WmsTCustomer> getAllCustByCustID(String custID) { return tongjiMapper.getAllCustByCustID(custID); }
    //开始查询
    public List<Mess> getAllWmsTCrDetails(String custID,String date,String date2) { return tongjiMapper.getAllWmsTCrDetails(custID,date,date2); }


}
